package ck.com.api;

import ck.com.dto.Dto;
import ck.com.pojo.DeliveryOrder;
import com.github.pagehelper.PageInfo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

public interface DeliveryOrderApi {

    /**
     * 根据状态获取货验收单
     * @param  param  参数
     * @return List
     */
    @RequestMapping(value = "/listDeliveryOrder")
    Dto<PageInfo<DeliveryOrder>> listDeliveryOrder(@RequestBody Map<String, Object> param);

    /**
     * 因为验货收货产生货验收单状态变化
     * @param  deliveryOrderList  参数，验收单id
     * @return 无
     */
    @RequestMapping(value = "/updateDeliveryOrderStatus")
    Dto updateDeliveryOrderStatus(@RequestBody List<DeliveryOrder> deliveryOrderList);
    /**
     * 因为入库单取消
     * @param  deliveryOrder  参数，装了入库单Id
     * @return 无
     */
    @RequestMapping(value = "/listDOByWhEntryId")
    Dto<List<DeliveryOrder>> listDOByWhEntryId(@RequestBody DeliveryOrder deliveryOrder);

    /**
     *
     * @param deliveryOrder
     * @return
     */
    @RequestMapping("/addDelivery")
    Dto<Integer> addDelivery(@RequestBody DeliveryOrder deliveryOrder);

    @RequestMapping("/selDeliveryId")
    Dto<DeliveryOrder> selDeliveryOrderId(@RequestParam("deliveryOrderCode") String deliveryOrderCode);

}
